package com.tech.zhidengxian.model.dataobject;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tech.zhidengxian.mapper.typehandler.JsonTypeHandler;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
@TableName(value = "zdx_comment",autoResultMap = true)
public class CommentDO {
  @TableId(value = "id",type = IdType.AUTO)
  private Long id;
  private Long level;
  private String content;
  private Long relationId;
  private String type;
  private Long replyId;
  private Date createTime;
  @TableField(typeHandler = JsonTypeHandler.class)
  private UserDO publisherInfo;
  @TableField(typeHandler = JsonTypeHandler.class)
  private List<CommentDO> secCommentList;
  private Boolean isDeleted;

}
